package cn.simon.free.redis.mq.component;

import cn.simon.free.redis.component.RedisSupport;
import cn.simon.free.redis.crud.service.RedisCrudService;
import cn.simon.free.redis.mq.model.normal.NormalMessageRo;
import org.springframework.stereotype.Component;

/**
 * ro 普通队列
 *
 * @author simon
 * @date 2021/7/2 11:45
 * @copyright:
 * @modifier
 * @motto a no talent, people who have to study hard
 */
@Component
public class RedisMessageNormalRoSupport extends RedisCrudService<NormalMessageRo, Long> {

    /**
     * 异步删除(等待时间)
     *
     * @param id
     */
    public void deleteByExpire(Long id) {
        RedisSupport.jedisHashSupport.setExpire(hashKey(id), 30);
    }
}
